<template>
    <div class="com">
         <div class="header-tit">
            <el-button type="primary" plain icon="el-icon-edit" size="mini" round>修改</el-button>
         </div>
        <el-table v-loading="loading" :data="list" :height="tabHeight" element-loading-text="加载中..." highlight-current-row element-loading-background="rgba(255, 255, 255, 0.5)" stripe tooltip-effect="dark">
            <el-table-column type="selection" width="55" align="center" fixed="left"></el-table-column>
            <el-table-column label="名称" align="center" prop="name" />
            <el-table-column label="值" align="center" prop="val" />
            <el-table-column label="备注" align="center" prop="memo" />
        </el-table>
            
    </div>
  </template>
  
  <script>
  export default {
    name: 'baseInfo',
    data() {
        return {
            // 按钮loading
            buttonLoading: false,
            // 遮罩层
            loading: true,
            tabHeight: '500px',
            list: [{name:'旋翼转速',val:'旋翼转速(Nr)(机电2)',memo:''}]
            
        };
    },
    methods: {
        //设置表格高度
        setTabHeight() {
            var clientHeight = 0;
            if (document.body.clientHeight && document.documentElement.clientHeight) {
                clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight;
            } else {
                clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight;
            }
            this.tabHeight = ((clientHeight ? clientHeight : 900) - this.$refs.queryForm.$el.clientHeight - 84 - 100) + 'px'
            // console.log(this.tabHeight)
        }
    },
    mounted() {
        this.$nextTick(() => {
            this.setTabHeight()
        })
        window.onresize = () => {
            return (() => {
                this.$nextTick(() => {
                    this.setTabHeight()
                })
            })()
        }

        this.loading = true;
        setTimeout(()=>{
            this.loading = false;
        },1000)
    },

  }
  </script>
  <style scoped lang="scss">
  .com{
    width: calc(100% - 40px);
    margin: 0 auto;
    .header-tit{
        width:100%;
        height: 50px;
      
        display: flex;
        justify-content: flex-end;
    }
  }
  </style>